class Person:
    def __init__(self,name,weight):
        self.name = name
        self.weight = weight
    def run(self):
        self.weight -= 0.5
    def eat(self):
        self.weight += 1
    def __str__(self):
        return f"体重为{self.weight}"

xiaoming = Person("xiaoming",80)
print(xiaoming)
xiaoming.run()
print(xiaoming)
xiaoming.eat()
print(xiaoming)